﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.SessionState;
using GWEB.WebBase.Entity;
using GWEB.WebBase.Utility;
using GWEB.WebFrame.Public;

namespace GWEB.WebFrame.Models
{
    public class Contract
    {
        public PageInfo Init()
        {
            PageInfo pg = new PageInfo();
            HttpSessionState session =System.Web.HttpContext.Current.Session;
            pg.dict = BasePage.getDict(session);
            pg.Type = "Contract";
            pg.SMenuId = "KH";
            pg.TableName = "cu_Cus_contacts";
            pg.KeyFieldName = "id";
            pg.Sop = BasePage.Grant(session, pg.SMenuId);
            ColumnInfo cl;
            cl = new ColumnInfo(); cl.DataType = Tag.Text; cl.FieldName = "linkName"; cl.HeadText = "姓名"; cl.IsCheck = true; cl.Length = 20; cl.ErrMessage = cl.HeadText + ":长度不能超过" + cl.Length;cl.IsNull = false; pg.AddColumn(cl);
            cl = new ColumnInfo(); cl.DataType = Tag.Text; cl.FieldName = "kidsName"; cl.HeadText = "宝宝小名"; cl.IsCheck = true; cl.Length = 20; cl.ErrMessage = cl.HeadText + ":长度不能超过" + cl.Length; pg.AddColumn(cl);
            cl = new ColumnInfo(); cl.DataType = Tag.Text; cl.FieldName = "LinkTel"; cl.HeadText = "联系电话"; cl.IsCheck = true; cl.Length = 11;cl.ErrMessage = cl.HeadText + ":长度为11位"; pg.AddColumn(cl);
            cl = new ColumnInfo(); cl.DataType = Tag.Text; cl.FieldName = "linkRelation"; cl.HeadText = "关系"; cl.IsCondition = true; cl.DictTypeID = "D04"; pg.AddColumn(cl);
            return pg;
        }
    }
}